<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div class="div1">1</div>
    <div class="div2">2</div>
    <div class="div3">3</div>

    <script type="module">
      import gsap from "../_snowpack/pkg/gsap.js";
      import { ScrollTrigger } from "../_snowpack/pkg/gsap/ScrollTrigger.js";
      gsap.registerPlugin(ScrollTrigger);
      const obj1 = gsap.utils.toArray(".div1")[0];
      const obj2 = gsap.utils.toArray(".div2")[0];
      gsap.to(obj1, { x: 100 });
      gsap.to(obj2, { x: 100 });
      gsap.to([obj1, obj2], { opacity: 0 });

      var a1 = gsap.getTweensOf(obj1); //finds 2 tweens
      var a2 = gsap.getTweensOf([obj1, obj2]); //finds 3 tweens
      console.log(a1)
      console.log(a2)
    </script>
  </body>
</html>
